<template>
  <el-dialog title="个人信息" destroy-on-close width="40%" v-model="dialogVisible">
    <template #default>
      <el-descriptions title="用户信息">
        <el-descriptions-item label="用户账号">{{ userStore.userAccount }}</el-descriptions-item>
        <el-descriptions-item label="用户全名">{{ userStore.userFullName }}</el-descriptions-item>
        <el-descriptions-item label="用户类型">{{ userStore.userType }}</el-descriptions-item>
        <el-descriptions-item label="用户手机">{{ userStore.userAttributes.userMobile }}</el-descriptions-item>
        <el-descriptions-item label="用户邮箱">{{ userStore.userAttributes.userEmail }}</el-descriptions-item>
        <!-- <el-descriptions-item label="Remarks">
          <el-tag size="small">School</el-tag>
        </el-descriptions-item>
        <el-descriptions-item label="Address">
          No.1188, Wuzhong Avenue, Wuzhong District, Suzhou, Jiangsu Province
        </el-descriptions-item> -->
      </el-descriptions>
    </template>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="dialogVisible = false">取消</el-button>
        <el-button type="primary" @click="dialogVisible = false">确认</el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { useUserStore } from "@/stores/modules/user";

const userStore = useUserStore();

const dialogVisible = ref(false);
const openDialog = () => {
  dialogVisible.value = true;
};

defineExpose({ openDialog });
</script>
